/**
 * This file is part of 1genia trampoline
 * Copyright (C) 2007 1genia (contact@1genia.com)
 *
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; version 3 of the License. 
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; see the file COPYING.TXT.  If not,
 * write to the Free Software Foundation, Inc., 51 Franklin Street,
 * Fifth Floor, Boston, MA 02110-1301, USA. 
 **/
package com.genia.toolbox.web.portlet.visitor;

import com.genia.toolbox.basics.exception.BundledException;
import com.genia.toolbox.web.portlet.bean.impl.ContainerPortlet;
import com.genia.toolbox.web.portlet.bean.impl.DispatcherPortlet;
import com.genia.toolbox.web.portlet.bean.impl.HolePortlet;
import com.genia.toolbox.web.portlet.bean.impl.LinkedPortlet;
import com.genia.toolbox.web.portlet.bean.impl.SimplePortlet;
import com.genia.toolbox.web.portlet.bean.impl.TemplatePortlet;

/**
 * The base interface for the design pattern Visitor used with
 * <code>Portlet</code>.
 */
public interface PortletVisitor
{

  /**
   * the visitor method for a <code>SimplePortlet</code>.
   * 
   * @param portlet
   *          the <code>SimplePortlet</code> begin visited
   * @throws BundledException
   *           if an error occurred
   */
  void visitSimplePortlet(SimplePortlet portlet)
      throws BundledException;



  /**
   * the visitor method for a <code>ContainerPortlet</code>.
   * 
   * @param portlet
   *          the <code>ContainerPortlet</code> begin visited
   * @throws BundledException
   *           if an error occurred
   */
  void visitContainerPortlet(ContainerPortlet portlet)
      throws BundledException;



  /**
   * the visitor method for a <code>DispatcherPortlet</code>.
   * 
   * @param portlet
   *          the <code>DispatcherPortlet</code> begin visited
   * @throws BundledException
   *           if an error occurred
   */
  void visitDispatcherPortlet(DispatcherPortlet portlet)
      throws BundledException;



  /**
   * the visitor method for a <code>LinkedPortlet</code>.
   * 
   * @param portlet
   *          the <code>LinkedPortlet</code> begin visited
   * @throws BundledException
   *           if an error occurred
   */
  void visitLinkedPortlet(LinkedPortlet portlet)
      throws BundledException;



  /**
   * the visitor method for a <code>HolePortlet</code>.
   * 
   * @param portlet
   *          the <code>HolePortlet</code> begin visited
   * @throws BundledException
   *           if an error occurred
   */
  void visitHolePortlet(HolePortlet portlet)
      throws BundledException;



  /**
   * the visitor method for a <code>TemplatePortlet</code>.
   * 
   * @param portlet
   *          the <code>TemplatePortlet</code> begin visited
   * @throws BundledException
   *           if an error occurred
   */
  void visitTemplatePortlet(TemplatePortlet portlet)
      throws BundledException;

}
